#include <bits/stdc++.h>
#include "../../tools/tools.h"
using namespace std;

constexpr int INF = 0x7fffffff; // 无穷大
typedef long long ll;

class Solution {
public:
    int minOperations(vector<int>& nums) {
        int ans = 0;
        for(int i = 0; i < nums.size(); i++) {
            nums[i] = ans % 2 == 0 ? nums[i] : 1 - nums[i];
            if(nums[i] == 0) ans++;
        }
        return ans;
    }
};

int main(int argc, const char** argv) {
    // Solution s;
    vector<int> data;
    data = {4, 2, 6, 3, 9};
    // debug();
    return 0;
}
